package org.osomit.sacct.provider.impl;

import org.osomit.sacct.provider.iface.AccountProvider;
import org.osomit.sacct.provider.iface.AccountProviderLifeCycle;
import org.junit.BeforeClass;
import org.junit.AfterClass;
import org.junit.Test;

/**
 * @author Jian Fang (John.Jian.Fang@gmail.com)
 *
 * Date: Jul 5, 2009
 * 
 */
public class AccountProviderImpl_MT {

    private static AccountProvider provider;
    private static AccountProviderLifeCycle cycle;

    @BeforeClass
    public static void setup(){
        provider = new AccountProviderImpl("server", "localhost", 9000, false);
        cycle = (AccountProviderLifeCycle)provider;
        cycle.create();
    }

    @Test
    public void testGetAccount(){
        System.out.println(provider.getAccountPassword("custApp"));
        System.out.println(provider.getAccountPassword("prodApp"));
    }

    @AfterClass
    public static void tearDown(){
        cycle.destroy();
    }
}
